3.294 \(\int \frac{\left (a+\frac{b}{x}\right )^n x}{(c+d x)^2} \, dx\)

Optimal. Leaf size=150 \[ -\frac{c \left (a+\frac{b}{x}\right )^{n+1} (a c-b d (1-n)) \, _2F_1\left (1,n+1;n+2;\frac{c \left (a+\frac{b}{x}\right )}{a c-b d}\right )}{d^2 (n+1) (a c-b d)^2}-\frac{c \left (a+\frac{b}{x}\right )^{n+1}}{d \left (\frac{c}{x}+d\right ) (a c-b d)}+\frac{\left (a+\frac{b}{x}\right )^{n+1} \, _2F_1\left (1,n+1;n+2;\frac{b}{a x}+1\right )}{a d^2 (n+1)} \]

[Out]

-((c*(a + b/x)^(1 + n))/(d*(a*c - b*d)*(d + c/x))) - (c*(a*c - b*d*(1 - n))*(a +
 b/x)^(1 + n)*Hypergeometric2F1[1, 1 + n, 2 + n, (c*(a + b/x))/(a*c - b*d)])/(d^
2*(a*c - b*d)^2*(1 + n)) + ((a + b/x)^(1 + n)*Hypergeometric2F1[1, 1 + n, 2 + n,
 1 + b/(a*x)])/(a*d^2*(1 + n))

_______________________________________________________________________________________

Rubi [A]  time = 0.32192, antiderivative size = 150, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333 \[ -\frac{c \left (a+\frac{b}{x}\right )^{n+1} (a c-b d (1-n)) \, _2F_1\left (1,n+1;n+2;\frac{c \left (a+\frac{b}{x}\right )}{a c-b d}\right )}{d^2 (n+1) (a c-b d)^2}-\frac{c \left (a+\frac{b}{x}\right )^{n+1}}{d \left (\frac{c}{x}+d\right ) (a c-b d)}+\frac{\left (a+\frac{b}{x}\right )^{n+1} \, _2F_1\left (1,n+1;n+2;\frac{b}{a x}+1\right )}{a d^2 (n+1)} \]

Antiderivative was successfully verified.

[In]  Int[((a + b/x)^n*x)/(c + d*x)^2,x]

[Out]

-((c*(a + b/x)^(1 + n))/(d*(a*c - b*d)*(d + c/x))) - (c*(a*c - b*d*(1 - n))*(a +
 b/x)^(1 + n)*Hypergeometric2F1[1, 1 + n, 2 + n, (c*(a + b/x))/(a*c - b*d)])/(d^
2*(a*c - b*d)^2*(1 + n)) + ((a + b/x)^(1 + n)*Hypergeometric2F1[1, 1 + n, 2 + n,
 1 + b/(a*x)])/(a*d^2*(1 + n))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 50.7196, size = 107, normalized size = 0.71 \[ - \frac{c \left (a + \frac{b}{x}\right )^{n + 1}}{d \left (a c - b d\right ) \left (\frac{c}{x} + d\right )} - \frac{c \left (a + \frac{b}{x}\right )^{n + 1} \left (a c + b d n - b d\right ){{}_{2}F_{1}\left (\begin{matrix} 1, n + 1 \\ n + 2 \end{matrix}\middle |{\frac{c \left (a + \frac{b}{x}\right )}{a c - b d}} \right )}}{d^{2} \left (n + 1\right ) \left (a c - b d\right )^{2}} + \frac{\left (a + \frac{b}{x}\right )^{n + 1}{{}_{2}F_{1}\left (\begin{matrix} 1, n + 1 \\ n + 2 \end{matrix}\middle |{1 + \frac{b}{a x}} \right )}}{a d^{2} \left (n + 1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+b/x)**n*x/(d*x+c)**2,x)

[Out]

-c*(a + b/x)**(n + 1)/(d*(a*c - b*d)*(c/x + d)) - c*(a + b/x)**(n + 1)*(a*c + b*
d*n - b*d)*hyper((1, n + 1), (n + 2,), c*(a + b/x)/(a*c - b*d))/(d**2*(n + 1)*(a
*c - b*d)**2) + (a + b/x)**(n + 1)*hyper((1, n + 1), (n + 2,), 1 + b/(a*x))/(a*d
**2*(n + 1))

_______________________________________________________________________________________

Mathematica [A]  time = 0.112424, size = 0, normalized size = 0. \[ \int \frac{\left (a+\frac{b}{x}\right )^n x}{(c+d x)^2} \, dx \]

Verification is Not applicable to the result.

[In]  Integrate[((a + b/x)^n*x)/(c + d*x)^2,x]

[Out]

Integrate[((a + b/x)^n*x)/(c + d*x)^2, x]

_______________________________________________________________________________________

Maple [F]  time = 0.064, size = 0, normalized size = 0. \[ \int{\frac{x}{ \left ( dx+c \right ) ^{2}} \left ( a+{\frac{b}{x}} \right ) ^{n}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+b/x)^n*x/(d*x+c)^2,x)

[Out]

int((a+b/x)^n*x/(d*x+c)^2,x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (a + \frac{b}{x}\right )}^{n} x}{{\left (d x + c\right )}^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^n*x/(d*x + c)^2,x, algorithm="maxima")

[Out]

integrate((a + b/x)^n*x/(d*x + c)^2, x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{x \left (\frac{a x + b}{x}\right )^{n}}{d^{2} x^{2} + 2 \, c d x + c^{2}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^n*x/(d*x + c)^2,x, algorithm="fricas")

[Out]

integral(x*((a*x + b)/x)^n/(d^2*x^2 + 2*c*d*x + c^2), x)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+b/x)**n*x/(d*x+c)**2,x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (a + \frac{b}{x}\right )}^{n} x}{{\left (d x + c\right )}^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^n*x/(d*x + c)^2,x, algorithm="giac")

[Out]

integrate((a + b/x)^n*x/(d*x + c)^2, x)